package org.pine;

import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

/**
 *
 * @author pine
 * @date 2018/7/6
 */
@Component
public class MyEnv implements EnvironmentAware {
    Environment environment;
    @Override
    public void setEnvironment(Environment environment) {
        this.environment = environment;
    }
    public  void printEnv() {
        System.out.println(environment.getProperty("JAVA_HOME"));
        System.out.println(environment.getProperty("CLASSPATH"));
        System.out.println(environment.getProperty("CLASSPATH"));
    }
}
